//
//  EditViewController.m
//  Four_Fit_New
//
//  Created by xalo on 16/7/14.
//  Copyright © 2016年 xmaz. All rights reserved.
//

#import "EditViewController.h"
#import "UserViewController.h"
#import "EditModel.h"

/**
 *  修改资料页面
 */

@interface EditViewController ()
@property (weak, nonatomic) IBOutlet UITextField *nameTextField;
@property (weak, nonatomic) IBOutlet UITextField *genderTextField;
@property (weak, nonatomic) IBOutlet UITextField *ageTextField;
@property (weak, nonatomic) IBOutlet UITextField *heightTextField;
@property (weak, nonatomic) IBOutlet UITextField *addressTextField;
@property (weak, nonatomic) IBOutlet UITextView *manifestoTextField;

@end

@implementation EditViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.nameTextField.keyboardType = UIKeyboardTypeDefault;
    self.genderTextField.keyboardType = UIKeyboardTypeDefault;
    self.ageTextField.keyboardType = UIKeyboardTypeDefault;
    self.heightTextField.keyboardType = UIKeyboardTypeDefault;
    self.manifestoTextField.keyboardType = UIKeyboardTypeDefault;
    
        
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"保存" style:(UIBarButtonItemStylePlain) target:self action:@selector(rightAction:)];
}


//保存
- (void)rightAction:(UIBarButtonItem *)sender {
    
    [self.delegate delegatePassValueIDName:self.nameTextField.text
                                    Gender:self.genderTextField.text
                                       Age:self.ageTextField.text
                                    Weight:self.heightTextField.text
                                   Purpose:self.manifestoTextField.text
                                   Address:self.addressTextField.text];
    [self.navigationController popToRootViewControllerAnimated:YES];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
